/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.game.math.view.domain;

import javax.swing.DefaultComboBoxModel;
import org.game.math.config.Configure;

/**
 *
 * @author nmduc
 */
public class NumExpressionComboBoxModel extends DefaultComboBoxModel {

    public NumExpressionComboBoxModel() {
        super(new String[]{"5","10","15","20","25","30"});
        this.setSelectedItem(Configure.getInstance().getTempProperties().getProperty(Configure.NUM_EXPRESSION));
    }

    @Override
    public void setSelectedItem(Object anObject) {
        super.setSelectedItem(anObject);
        Configure.getInstance().getTempProperties().setProperty(Configure.NUM_EXPRESSION, (String) anObject);
    }
}
